package com.heyqing.dynamic.Backpack0or1;

import java.util.Scanner;

/**
 * ClassName:Backpack
 * Package:com.heyqing.dynamic.Backpack0or1
 * Description:
 *
 * @Date:2024/6/4
 * @Author:Heyqing
 */
public class Backpack {
    //背包容量
    private int w ;
    public Backpack() {
        System.out.println("请输入背包容量：");
        Scanner sc = new Scanner(System.in);
        w = sc.nextInt();
        sc.close();
    }

    public int getW() {
        return w;
    }
}
